package org.inote.utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;


public class DateFormatUtil {

    //String转化为Date类型
    public static java.util.Date dataFormat(String date) {
        if(date != null){
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            try {
                java.util.Date utilDate =  sdf.parse(date);
                return utilDate;
            } catch (ParseException e) {
                e.printStackTrace();
            }
        }
        return null;
    }
}
